<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
function check(){
	var pwd1=document.regForm.c_pass.value;
	var pwd2=document.regForm.c_pass1.value;
	if(pwd1===pwd2){
		return true;
	}else{
		alert("两次密码不一致");//弹出警告
		document.regForm.c_pass.value="";
		document.regForm.c_pass1.value="";
		return false;
	}
}
</script>
<body>
<h1>用户注册</h1>
<form action="CustomerServlet" name="regForm" method="post" onSubmit="return check()">
<input type="hidden" name="method" value="reg">
用户名：<input type="text" name="c_name"><br>
密&nbsp;码:<input type="password" name="c_pass"/><br>&nbsp;<br>
确&nbsp;认:<input type="password" name="c_pass1"/><br>&nbsp;<br>
<input type="submit" value="注册">&nbsp;
<input type="submit" value="重置">
</form>
</body>
</html>